home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7036 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  35 lines

  1. Path: solon.com!not-for-mail
  2. From: Bruce Stephens <bruce@liv.ac.uk>
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated
  4. Subject: Re: Can someone tell me why C can't support the following
  5. Date: 17 Feb 1996 12:07:30 -0600
  6. Organization: IASC, University of Liverpool
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4g55h2$b1b@solutions.solon.com>
  10. References: <4g27n5$qa4@solutions.solon.com>
  11. NNTP-Posting-Host: solutions.solon.com
  12. X-Newsreader: Gnus v5.0.12
  13.  
  14. >>>>> "Alan" == Alan Krantz <atk@mathcs.emory.edu> writes:
  15.  
  16. > I know the following is illegal but I would really really like to
  17. > know why C can't support the following construct:
  18.  
  19. I don't know why standard C doesn't allow this.  Probably just
  20. simplicity: there are lots of possibly worthy additions, and the
  21. committees have only so much time to discuss them all.  For what it's
  22. worth, GNU C supports the following:
  23.   
  24. struct _mytbl {
  25.   char  *str;
  26.   int   *data;
  27. } mytbl[] = {{"Not Defined", (int []){0}},
  28.              {"Square",      (int []){1,2,3,4,0}},
  29.              {"Circle",      (int []){1,2,0}},
  30. };
  31. -- 
  32. Bruce                   Institute of Advanced Scientific Computation
  33. bruce@liverpool.ac.uk   University of Liverpool
  34. http://supr.scm.liv.ac.uk/~bruce/
  35.